package com.stone;/*

 */

import org.apache.http.HttpHost;
import org.elasticsearch.client.RestClient;
import org.elasticsearch.client.RestHighLevelClient;

import java.io.IOException;

/**
 * @ClassName EsTest_Client
 * @Author Final
 * @Project DataStructures
 */
public class EsTest_Client {

    public static void main(String[] args) throws IOException {

        //创建客户端
        RestHighLevelClient esClient=new RestHighLevelClient(
                RestClient.builder(new HttpHost("localhost",9200,"http"))
        );


        //关闭es客户端
        esClient.close();
    }
}
